/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package service;

import java.util.List;
import pojo.SanPham;

/**
 *
 * @author MongKieu
 */
public interface SanPhamService {

    public int soLuongSanPhamTheoTheLoai(int maTheLoai);

    public List<SanPham> listSanPhamTheoTheLoai(int maTheLoai);

    public int tinhSoLuongTrang(int maTheLoai);

    public List<SanPham> listSanPhamTheoTheLoaiCoPhanTrang(int maTheLoai, int trang);

    public boolean kiemTraSanPhamTonTai(int maSanPham);

    public SanPham laySanPhamByMaSanpPham(int maSanPham);

    public boolean kiemtraSanPhamTonTaiByISBN(String ISBN);

    public SanPham laySanPhamByISBN(String ISBN);
    public String creatQueryChoSanPhamMoiVaSapPhatHanh(String loaiTimKiem);


    public List<SanPham> listSanPhamMoiNhapVe(int soLuongSanPham,String loaiTimKiem);

    public int soLuongSanPhamMoiNhapVe(int soLuongMax,String loaiTimKiem);

    public List<SanPham> listSanPhamMoiNhapVeCoPhanTrang(int trang, int soSanPhamTrenTrang,String loaiTimKiem);

    public int tinhSoLuongTrangChoSanPhamMoiNhapVe(int soLuongSanPhamTrenTrang, int soLuongSanPhamToiDa,String loaiTimKiem);

    public int soLuongAllSanPhamTrongNhaSach();

    public List<SanPham> listAllSanPhamTrongNhaSach(int viTriBatDau, int soLuongSanPham);

    public List<SanPham> listSanPhamTheoTenVaNhomSanPhamCoPhanTrang(String tenSanPham, int theLoai, int trang, int soLuongSanPhamTrenTrang);

    public List<SanPham> listSanPhamTheoTenVaNhomSanPham(String tenSanPham, int theLoai);

    public int tinhSoLuongTrangChoSanPhamTimKiemTheoTenVaNhomSanPham(String tenSanPham, int theLoai, int soLuongSanPhamTrenTrang);

    public int soLuongSanPhamimKiemTheoTenVaNhomSanPham(String tenSanPham, int theLoai);

    public String createMyQueryChoTimKiemTheoTenVaNhomSanPham(String tenSanPham, int nhomSanPhm);
}
